package org.orz.story.member.common.exception;

import org.orz.cloud.common.exception.BusinessException;
import org.orz.cloud.common.exception.ErrorCode;

public class MemberException extends BusinessException {
    public MemberException(ErrorCode code) {
        super(code);
    }

    public MemberException(String errorCode, String errorMessage) {
        super(errorCode, errorMessage);
    }


    public enum Type implements ErrorCode {
        MEM_0001("MEM_0001","账号不存在"),
        MEM_0002("MEM_0002","超出可登录设备数量"),
        MEM_0003("MEM_0003","密码错误"),
        MEM_0004("MEM_0004","账号已存在"),
        MEM_0005("MEM_0005","您没有权限登录当前平台"),

        ;
        private String code;

        private String message;

        Type(String code, String message) {
            this.code = code;
            this.message = message;
        }

        @Override
        public String getCode() {
            return code;
        }

        @Override
        public String getMessage() {
            return message;
        }
    }



}
